
$("#ensure").click(function () {
        var code = $("#code").val();
        var codeValue = $("#codeValue").val();
        var id = $("#id").val();
        var reservationsId = $("#reservationsId").val();
        var productId = $("#productId").val();
    if($("#code").val() == ""){
        alert("请输入验证码！");
        return;
    }
    $.ajax({
        url: Feng.ctxPath + "/integralMallWeixin/codeNumber",
        type: "post",
        data: {
            code:code,codeValue:codeValue,id:id,reservationsId:reservationsId,productId:productId
        },
        success: function (data) {
            if(data==1){
                alert('验证码不正确，重新输入')
            }else{
                Feng.success('操作成功!');
                window.parent.MemberProduct.table.refresh();
                $("#cancel").click();
            }
        }, error: function (data) {
            alert('没有权限，请联系管理员!');
        }
    });
});

$("#cancel").click(function () {
    parent.layer.close(parent.layer.getFrameIndex(window.name))
});